Use Markdown export templates to choose which text, notes and custom attributes appear in your exported document—and where they appear. Each node type can use its own template or keep Traverse’s standard export. This guide also covers document-level YAML front matter and the Fountain Title Page editor.
Traverse Pro is required to open the template editor and create or change templates. If a document already contains saved templates, they still apply to Markdown Document exports without Pro, as long as Type is active. Non-Pro users can continue editing the outline’s content.
Get started
- Open the document’s Attributes window and add Type if it is not already active.
- Choose Markdown Templates… in that window.
- Select a node type and turn on Use custom template.
- Start with
{{nodeText}}, then use Insert Token to add fields or Optional Section to insert a condition. - Check the preview, then choose Apply.
For a document with Type active, File → Document Properties → Edit Markdown Templates… opens the same editor.
Templates are saved with this document and apply to Markdown Document export. They do not change the text in your outline. Removing Type makes saved templates inactive; adding it again restores their use. Turning a type back to Standard keeps its custom template for later.
Tokens: insert text and attributes
A token is replaced separately for each exported node. Use the field’s key, which may differ from its visible label. Insert Token supplies the correct key.
| Token | Inserts |
|---|---|
{{nodeText}} | The node’s main text |
{{_note}} | Its attached note |
{{duration}} | The attribute whose key is duration |
Use a token more than once if you want its value in multiple places. Values are not evaluated as new template instructions.
Node text and attached notes keep their Markdown. URL-type attributes preserve their links. Other attribute values are escaped as ordinary Markdown text, so characters such as * and [ do not unexpectedly become formatting.
For example, with a Duration attribute whose key is duration:
{{nodeText}} — {{duration}} minutes
Standard export and custom templates
The settings in Settings → Export → Markdown Document apply to Markdown Document exports unless overridden by custom templates saved with a document.
In the document’s Attributes → Markdown Templates… window, you can override title and heading choices, notes and additional attributes separately for each node type. Node types set to Standard in the Markdown Templates window continue to use the export settings shown in Settings. The Export defaults and templates box below the export options explains this relationship.
- Standard (Use custom template off): this node type follows your Markdown Document export preferences.
- Custom (Use custom template on): this node type’s template decides which notes and attributes appear, overriding those preferences. Include their tokens to export them, or leave them out to omit them.
For example, Body nodes can use a custom template that includes a duration and omits attached notes, while Heading and List item nodes remain Standard and follow the export preferences. Enabling a template for Body does not change the choice for other types. Switch Body back to Standard to use the preferences again.
The notes and Include additional attributes preferences do not add fields to a custom template automatically, and turning those preferences off does not suppress tokens you included. A custom Note-node template also overrides note inclusion and comment formatting. Task status and numbering continue to follow their export preferences.
| Node type | What Traverse adds to your template output |
|---|---|
| Body | Normal spacing between nodes |
| Heading | The heading’s # markers and level |
| List item | The bullet or number, task marker when applicable, and indentation for additional lines |
| Blockquote | A > prefix on every output line, including blank lines |
| Note | Your custom output, including any comment markers you write |
| Code and Divider | These always use Standard export |
Bullet and numbered items share the List item template. Traverse still controls numbering, including the Preserve numbering option. Draft nodes and their children remain excluded.
Headings
With Use custom template enabled for Heading, choose a Starting heading level from H1 to H6. This is saved with the document and overrides the app-wide Markdown Document title preference.
At Level 1, Use H1 for lets you choose:
- Document title: export the document title as H1 and start top-level heading nodes at H2.
- Top-level headings: omit the document title and start top-level heading nodes at H1.
At Levels 2–6, the document title is omitted and top-level heading nodes start at your chosen level. For example, H3 gives ### for top-level headings and #### for their child headings. Nested headings increase with the hierarchy, up to H6. Focused exports still omit the document title.
Choose Standard for Heading to use the app-wide preference again; your custom settings remain saved. Previously saved templates without heading-level settings keep following the app-wide preference until you configure these controls.
Write only the title in Heading text. It must stay on one line; Traverse supplies the heading markers. Use Content below heading for extra paragraphs, notes or attributes.
After children
Custom Body and Heading templates have an optional After children editor. Its content appears after all children and their descendants, before the next sibling. Heading’s Content below heading still appears immediately below the heading, before its children.
Tokens in After children use the owning node’s text and attributes.
With no children, the trailing content follows the node’s normal content immediately in export order, using the usual paragraph spacing. A nested node’s trailing content finishes before its parent’s. Empty trailing output adds no space. The field can also produce output when the main template is empty.
Conditions, highlighting, token insertion, Undo/Redo and spacing tokens work in this field too. Use {{noBlankBefore}} to remove the blank line before trailing content. Typed indentation is preserved. If task status wraps the owning Body/Heading node as a list item, trailing content is indented as continuation content; it does not get another task marker or heading prefix.
Inside trailing conditions, previous.key refers to the last node that contributed output before this content, often the final exported descendant. Once trailing content is emitted, its owning node becomes the previous node for subsequent output. Filtered and focused exports only include trailing content for nodes included in their export scope; excluded ancestors do not add closing content. Draft subtrees stay excluded.
The field is saved with the document and is used only while that node type is Custom. Standard and Export Using Standard ignore it. Pro is needed to edit it; saved trailing templates still export without Pro.
Lists and quotes
For a list item, additional template lines are indented beneath that item. Blank lines can separate paragraphs within the item. For a blockquote, a template containing:
{{nodeText}}
{{_note}}
might export:
> A useful idea
>
> A supporting detail.
Note nodes and attached notes
A standalone Note node’s own text is {{nodeText}}. Its separate attached note is {{_note}}.
A custom Note template controls inclusion and formatting even when note export is turned off in Settings. To export Note nodes as comments, for example:
<!-- {{nodeText}} -->
Standard Note nodes continue to follow the note-inclusion and comment-format settings.
Optional sections
Use if to include content only when a condition matches:
{{nodeText}}{{#if duration}} — {{duration}} minutes{{/if}}
A simple if checks:
- Checkbox: checked. For Task, checked means complete.
- Other fields: a value is present. Zero counts as a value; whitespace-only text does not.
An optional else supplies a fallback:
{{#if ready}}Ready{{else}}Not ready{{/if}}: {{nodeText}}
Put spaces and punctuation inside the conditional when they should disappear along with its value.
Text comparisons
Compare against text in double quotes:
{{#if size = "Big"}}Large: {{nodeText}}{{else}}{{nodeText}}{{/if}}
Use = or == for equality, or != for a different value. Matching is exact and case-sensitive, including spaces. Missing values compare as empty text. Escape a quote inside the comparison value with \".
Lookup selections
Use contains to check for one complete lookup selection:
{{#if size contains "Big"}}Large: {{nodeText}}{{else}}{{nodeText}}{{/if}}
This matches a lookup containing both Big and Small, regardless of their order. It does not match Bigger or big. A selection containing a comma is still checked as one complete selection.
Missing or empty lookups and fields of other types do not match. The = comparison retains its whole-text meaning: a lookup with Big and Small selected compares as Big, Small, in its stored order.
Numeric comparisons
Use >, >=, <, <=, =, == or !=:
{{#if duration > 20}}Over 20 minutes{{/if}}
These work with Number attributes and numeric text. Write plain numbers with a dot for decimals, without currency symbols or thousands separators. Missing or nonnumeric values do not match, even with !=.
Nested conditions
Conditions can contain other conditions. Each if needs its own /if; else belongs to the nearest open condition.
{{#if size = "Big"}}{{#if ready}}Big and ready{{else}}Big, not ready{{/if}}{{else}}Another size{{/if}}
Whitespace in a template is output too. Use new lines for readability when you also want those lines in the exported content.
Check the previous exported node
Inside a condition, prefix a field key with previous.:
{{#if previous.type = "heading"}}{{noBlankBefore}}{{/if}}{{nodeText}}
This places the current node directly below the previous exported node when that node is a Heading. Presence, checkbox, text, numeric and lookup-membership checks work the same way with previous fields:
{{#if previous.size contains "Big"}}{{inset}}{{/if}}{{nodeText}}
“Previous” means the preceding node that actually contributes content in the current export scope. It follows export order across parents and children, not just siblings. Draft nodes, omitted notes/dividers and empty template output do not become the previous node. The document title is not a node.
The first exported node has no previous node, so all previous-field conditions are false. previous.key is available in conditions only; output tokens still refer to the current node.
Check the parent node
Choose Optional Section → Parent Node or add parent. before a field key in a condition. This example italicizes the current node’s text when its immediate parent is a Heading.
{{#if parent.type = "heading"}}_{{nodeText}}_{{else}}{{nodeText}}{{/if}}
Use the same presence, checkbox, text, numeric and lookup-membership checks with parent fields, including parent.nodeText, parent._note and custom attributes. The condition uses the immediate parent in the outline, even if that parent produces no Markdown or is outside a focused export. Top-level nodes have no parent, so their parent conditions are false. Use parent.key inside conditions. Output tokens refer to the current node.
Check for the first or last child
Choose Is First Child or Is Last Child under Optional Section. These conditions check the current node’s position under its immediate parent in the outline.
{{#if first child}}First: {{/if}}{{nodeText}}{{#if last child}} (last){{/if}}
An only child matches both conditions. Top-level nodes match neither. Focused and filtered exports use the original sibling order, including siblings omitted from the export.
Check whether a node has children
Choose Optional Section → Has Children to check whether the current node has any direct children. This example adds a colon after the text of a node with children.
{{nodeText}}{{#if has children}}:{{/if}}
The condition uses the original outline, including children omitted from the export. A node with no children takes the else branch if you include one.
Spacing and indentation
Typed spaces, tabs and newlines are preserved within template content. Blank boundary lines at the beginning and end are removed. Normal spacing between nodes is still supplied by Traverse.
The layout options at the bottom of Insert Token provide explicit spacing:
| Token | Effect |
|---|---|
{{inset}} | Four spaces at this position; it does not indent later lines automatically |
{{lineBreak}} | One newline in the Markdown source |
{{blankLine}} | Two newlines, leaving an empty line between paragraphs |
{{noBlankBefore}} | Removes the usual blank line before this node, leaving one line break |
For an attached note in a separate paragraph:
{{nodeText}}{{#if _note}}{{blankLine}}{{_note}}{{/if}}
For a paragraph that follows the previous node directly when its continuation checkbox is checked:
{{#if continuation}}{{noBlankBefore}}{{/if}}{{nodeText}}
noBlankBefore prints no text. It changes only the gap before this node, leaving internal blank lines and the gap before the next node alone. It has no effect at the start of the export or when the template produces no content.
Layout tokens can be conditional and add to any whitespace already typed. Like typed whitespace, their blank boundary lines are trimmed. For Headings, use line breaks in Content below heading, not Heading text.
A Markdown renderer may display a single source newline as a space. Use a blank line when you want a new paragraph. Four leading spaces can also have Markdown meaning, such as a code block: choose indentation to suit the Markdown you intend to produce. Keep a node as Body for literal indentation without heading, list or quote wrappers.
Format dates
Use the date filter with a Date attribute:
{{due | date: long}}
{{due | date: "d MMM yyyy"}}
Replace due with your field’s key. The presets are short, medium, long, full and iso. The first four follow your locale; iso uses yyyy-MM-dd. {{due | date}} uses Medium.
For a custom pattern, d is the day, MMM the abbreviated month, MMMM the full month and yyyy the calendar year. For example, "dd/MM/yyyy" gives a day/month/year format.
Date-only values keep their calendar day. ISO timestamps use your local time zone. Missing or invalid dates produce no text. A token without a date filter keeps the stored value.
URLs and links
For a URL-type attribute, insert its token on its own:
{{website}}
A bare address stays an address, with spaces and round brackets encoded when needed. A stored Markdown link such as [Workshop schedule](https://example.com) is preserved as written, including its label and formatting. String fields still insert ordinary escaped text.
If you want to give the link a different label, use | url to take only the address:
[{{nodeText}}]({{website | url}})
Here, website is the field key and url is the filter. This works even if the stored field already contains a titled Markdown link. Avoid placing a complete titled link inside another link destination.
Insert a field without Markdown escaping
Use | raw when a field contains markup your publishing tool should interpret. This token inserts the full shortcode stored in the _sample field.
{{_sample | raw}}
Print token braces literally
Put one backslash before the opening braces:
\{{nodeText}}
This exports the literal characters {{nodeText}}; the backslash is removed.
Preview, syntax colours and undo
The preview shows the current export scope with your draft templates applied. It refreshes after a short pause in typing. While an expression is incomplete or invalid, the preview keeps the last valid output visible. The editor shows the validation message below the preview and enables Apply when the draft is valid.
Syntax colours distinguish conditions, fields, comparisons, filters, quoted values and layout tokens. The colours adapt to light and dark appearance and appear only in the editor.
Undo and Redo in the template editor affect only the current editing session. Use ⌘Z and ⇧⌘Z, or the editor’s buttons. Typing, pasting, token insertion, resets and Standard/Custom changes can be undone across node types, including while a template is invalid.
Cancel discards the draft. Apply saves it as one document change. A new editing session starts with a fresh local history.
YAML front matter
Front matter adds document-level metadata at the beginning of a Markdown Document export. Open Attributes → Markdown Front Matter…, turn on Include YAML front matter, and choose either Structured fields or YAML text. You can also open the same editor from File → Document Properties → Edit Markdown Front Matter…. Type is not required.
The YAML editor is available for documents without the Fountain attribute. Fountain documents use the separate Fountain Title Page editor, which writes Fountain’s own metadata format. Existing saved YAML is preserved when Fountain is active, but it is never applied to Fountain exports.
Pro is required to open this editor and change its settings. Saved front matter continues to export without Pro. It is saved with the document when you choose Apply; opening the editor and cancelling adds nothing to the OPML file.
Structured fields
Add any keys your publishing system needs, such as title, author, date, tags or draft. Each field has a value type:
- Text: manually entered text. Traverse handles YAML quoting and special characters.
- Number: a plain number, including zero or a negative decimal.
- Checkbox: true when checked, false when unchecked. False is retained in the export.
- Date: an ISO date string in YYYY-MM-DD format.
- List: one text item per line. Each line becomes a separate list entry.
- Document title / Document description: the current document value, updated automatically when the document changes.
- Export date (today): the date when the Markdown is exported, in your local time zone, formatted as YYYY-MM-DD.
- Export date and time: the export instant as an ISO 8601 UTC timestamp, such as
2026-12-02T10:30:00Z.
Use the arrow buttons to reorder fields and the trash button to remove them. Keys must be nonempty and unique. A single Omit when empty toggle applies to all structured fields. With it off, empty text is retained as an empty string, lists as empty lists, and empty numbers/dates as null. Zero and false are always retained. Nonempty numbers and dates must still be valid.
Use a fixed Date for a publication date that should stay unchanged. Use Export date (today) or Export date and time for metadata that should refresh on every export. These choices store a dynamic source, not the day when you configured the field. Dates use the unambiguous ISO format YYYY-MM-DD (for example, 2026-12-02); timestamps include a UTC Z suffix.
These fields describe the document as a whole. They do not collect values from node attributes.
Write YAML yourself
Choose YAML text to enter or paste YAML directly. You can paste just the key/value content or include its surrounding --- lines; Traverse adds one front-matter wrapper in the export.
For example:
title: "Website refresh"
author: "Sam"
date: "2026-12-02"
tags:
- website
- updates
draft: false
seo:
description: "A short project update."
YAML text supports nested values, comments and multiline blocks. Insert Token offers document values and export dates:
title: "{{documentTitle}}"
description: "{{documentDescription}}"
date: "{{exportDate}}"
updated: "{{exportDateTime}}"
{{documentTitle}} and {{documentDescription}} insert the document’s current title and description on every export. They work as whole values or within other text, with or without quotes. Quotes, punctuation and multiline descriptions are escaped safely as YAML strings. For example, title: "Report: {{documentTitle}}" adds a prefix. Values containing these tokens may be re-quoted to preserve their text; unrelated fields and comments remain unchanged. An explicitly written description key remains present with an empty string when the document has no description.
{{exportDate}} becomes the local export date, such as 2026-12-02. {{exportDateTime}} becomes an ISO 8601 UTC timestamp, such as 2026-12-02T10:30:00Z. Keep the surrounding quotes if you want YAML strings. Both values come from the same export instant. Prefix a token with one backslash to keep its braces as literal text. Other node-template tokens are not evaluated here.
The structured omission toggle does not remove empty values you explicitly wrote in YAML text. The content must be one YAML mapping of keys and values. Invalid YAML is reported in the editor and cannot be applied while front matter is enabled.
Insert Structured Fields can fill an empty YAML text area from your structured fields, using the current omission choice. Document-title, document-description and export-date sources are inserted as dynamic tokens, so they continue to refresh. Literal text and list items containing token braces remain literal. Switching modes keeps each mode’s content; it does not automatically convert or overwrite either draft. Only the selected mode is exported.
Preview and export
The live preview shows front matter together with the current document export scope. Long lines wrap within the preview pane; this display wrapping does not add line breaks to the exported text. Front matter appears once, before any document title, heading or focus/filter comments. A YAML title is independent of the visible H1 and the custom Heading starting level.
Undo and Redo affect the current front-matter editing session. Cancel discards its draft; Apply saves it as one document change. Turning off Include YAML front matter keeps both modes saved for later but omits the block from export. Front matter affects Markdown Document export only.
Fountain title page
Fountain uses its own title-page metadata syntax, rather than YAML front matter. Its optional title page appears at the beginning of the exported screenplay. See the official Fountain title-page specification for the format.
Open the editor
With the Fountain attribute active, open Attributes → Fountain Title Page…, or File → Document Properties → Edit Fountain Title Page…. Both open the same two-pane editor. The title-page fields previously shown inline in Document Properties are now edited here.
The left pane shows a fixed set of fields; there are no Add or Remove controls. The right pane previews the Fountain source that those fields produce. Long preview lines wrap for readability without changing the exported text.
| Field | What it contains |
|---|---|
| Title | The document’s shared title, also shown in Document Properties |
| Credit | For example, Written by |
| Author | One author, or multiple authors on separate lines |
| Source | An optional source or adaptation credit |
| Draft date | Fixed text or the date of export, selected as described below |
| Contact | Contact details, including multiple lines if needed |
| Notes | Optional title-page notes; this is separate from notes attached to outline nodes |
Leave optional fields empty to omit them from the title page. Clearing a field removes its exported entry. Title remains the document title; if cleared, it uses the usual Untitled fallback. Multiline values are written using Fountain’s indented-value syntax.
Fixed draft date or date of export
Under Draft date, choose:
- Fixed text: enter the date or wording you want to keep, such as
29 November 2026orSecond draft. Traverse exports it as entered and does not reformat it. - Date of export: automatically insert the date each time the Fountain document is exported. This stores the source choice, rather than freezing the day when you selected it.
The date of export uses a full date in your current locale and local time zone. For example, exporting on 29 November 2026 produces 29 November 2026 in UK English or November 29, 2026 in US English. Month names are localized too. This avoids ambiguous short numeric dates. Fountain does not prescribe a particular date format; this localized full-date style is Traverse’s choice. It differs from YAML export dates, which use ISO YYYY-MM-DD.
The editor shows the current date and explains the formatting. Its preview refreshes while open, including when the day changes. Switching to Date of export retains your fixed text, so you can return to it later. No template token is needed in the Fountain date field.
Preview, save and export
The preview shows the title-page source, even when title-page export is currently disabled. A message beside it tells you whether your export settings include the page. Turn Settings → Export → Fountain → Include document title and metadata on to include it in Fountain exports; turn it off to omit the entire title page, including any dynamic draft date. This does not remove the saved fields. Focused Fountain exports omit the title page even when that setting is on.
For example, with a UK-English export date of 29 November 2026:
Title:
Weekend Shift
Credit: Written by
Author: Sam
Draft date: 29 November 2026
Contact:
[email protected]
INT. OFFICE - DAY
The editor uses local Undo and Redo for draft changes, including the draft-date source. Cancel discards the draft. Apply saves the title and metadata as one document undo step. Editing the title here updates the same document title used by Document Properties. Opening an editor from Document Properties does not commit its other unfinished property changes.
Existing title-page fields continue to use their existing OPML metadata; no migration is needed. Selecting Date of export saves an additional source choice while retaining the fixed text. Read-only documents cannot save title-page changes. Reading view still permits editing these document properties.
Pro is not required to edit the title page of an existing Fountain document. Adding the Fountain attribute remains a Pro feature. YAML front-matter and Markdown-template editing retain their separate Pro requirements. Fountain title-page values affect Fountain export; Markdown templates and saved YAML never alter Fountain output.